﻿<UserControl x:Class="Example.Frontend.Customers.CustomerEditView" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:System="clr-namespace:System;assembly=mscorlib" 
        mc:Ignorable="d"
        d:Width="425" d:Height="132"
        MinWidth="380" MinHeight="132"
             Margin="10">
    <!--<AdornerDecorator>-->
        <Grid Height="Auto" x:Name="MainGrid" VerticalAlignment="Top" >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"  />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Label Margin="3" Grid.Row="0" Grid.Column="0" >Contact name:</Label>
            <TextBox x:Name="Customer_Name" Text="{Binding Path=Customer.Name, ValidatesOnDataErrors=True, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}" Margin="3" Grid.Row="0" Grid.Column="1" />

            <Label Margin="3" Grid.Row="1" Grid.Column="0" >Contact title:</Label>
            <TextBox x:Name="Customer_Surname" Margin="3" Grid.Row="1" Grid.Column="1" />

            <Label Margin="3" Grid.Row="2" Grid.Column="0" >Company name:</Label>
            <TextBox x:Name="Customer_BirthDate" Margin="3" Grid.Row="2" Grid.Column="1" />

            <StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
                <Button x:Name="Confirm" Margin="5" >Save</Button>
                <Button x:Name="Cancel" Margin="5"  >Cancel</Button>
            </StackPanel>

        </Grid>
    <!--</AdornerDecorator>-->
</UserControl>
